﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication27
{
    public partial class Liczba
    {
        public char znak = '+';
        public List<ulong> element;
        public ulong system = 10;








        public Liczba(List<ulong> liczba, ulong system)
        {

            this.element = liczba;
            this.system = system;


        }

        public Liczba(List<ulong> liczba, ulong system, char znak)
        {

            this.element = liczba;
            this.system = system;
            this.znak = znak;


        }

        public Liczba(ulong system)
        {

            this.element = new List<ulong>();
            this.element.Add(0);
            this.system = system;

        }

        public Liczba(string s, ulong system)
        {
            string[] temp = s.Split(' ');
            this.element = new List<ulong>();
            foreach (string x in temp)
            {
                ulong lol = (ulong)Int64.Parse(x);
                this.element.Add(lol);
            }
            this.system = system;

        }







        public override string ToString()
        {
            StringBuilder build = new StringBuilder();
            build.Append(znak);
            foreach (ulong l in this.element)
            {
                build.Append(l + " ");

            }
            return build.ToString();


        }

        public string Tobinarystring()
        {
            StringBuilder build = new StringBuilder();
            foreach (ulong l in this.element)
            {
                build.Append(l);

            }
            return build.ToString();


        }


    }
}
